﻿//3.Write a program that compares two char arrays lexicographically (letter by letter).


using System;

class CompareTwoCharArrays
{
    static void Main()
    {
        char[] firstArray = {'a', 'b', 'c', 'd', 'e', 'f' };
        char[] secondArray = { 'd', 'e', 'f', 'g', 'h' };
        for (int i = 0; i < firstArray.Length; i++)
        {
            for (int j = 0; j < secondArray.Length; j++)
            {
                if (firstArray[i] == secondArray[j])
                {
                    Console.WriteLine("firstArray[{0}] is the same, as secondArray[{1}]", i, j);
                }
                else
                {
                    Console.WriteLine("firstArray[{0}] is different then secondArray[{1}]", i, j);
                }
            }
        }
    }
}
